-- GENERATED SPELL FOR [Necro Overlord Mezhen] --


function spell0_24018(pUnit, Event) --@Drain Soul,n/a--
pUnit:FullCastSpellOnTarget(32862,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24018', 5000, 1)
end

function spell1_24018(pUnit, Event) --@Raise Dead,Self--
pUnit:FullCastSpellOnTarget(43559,pUnit)
pUnit:RegisterEvent('Sorts_24018', 1500, 1)
end

function Sorts_24018(pUnit, Event)
local choix_sorts_24018 = math.random(0, 1)
if choix_sorts_24018 == 0 then
pUnit:RegisterEvent('spell0_24018', 1, 1)
end
if choix_sorts_24018 == 1 then
pUnit:RegisterEvent('spell1_24018', 1, 1)
end
end

function mob24018_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24018', math.random(1500, 3000), 1)
end

function mob24018_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24018_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24018_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24018, 1, 'mob24018_Action')
RegisterUnitEvent(24018, 2, 'mob24018_Leave')
RegisterUnitEvent(24018, 3, 'mob24018_Kill')
RegisterUnitEvent(24018, 4, 'mob24018_Die')
